package com.changgou.pay.feign;

import com.changgou.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(name = "pay")
public interface PayFeign {

    @GetMapping("/wxpay/nativePay")
    public Result<Map> nativePay(@RequestParam("orderId") String orderId, @RequestParam("money")Integer money);

    //基于微信查询订单
    @GetMapping("/wxpay/query/{orderId}")
    public Result queryOrder(@PathVariable String orderId);

    //基于微信关闭订单
    @GetMapping("/wxpay/close/{orderId}")
    public Result closeOrder(@PathVariable String orderId);
}
